﻿#include<iostream>
#include "Preson.h"
#include "Student.h"
#include "ClassCadre.h"
#include "Monitor.h"
using namespace std;
#include "StudentManager.h"

int main() {

	StudentManager StuM;
	int choice = 0;

	//Preson* worker = NULL;
	//worker = new Student(1, "张三", 1);
	//worker->showInfo();
	//delete worker;
	//system("pause");
	//worker = new ClassCadre(2, "李四", 2);
	//worker->showInfo();
	//delete worker;
	//system("pause");
	//worker = new Monitor(3, "王五", 3);
	//worker->showInfo();
	//delete worker;
	//
	while (true)
	{
		//展示菜单
		StuM.Show_Menu();
		cout << "请输入您的选择:" << endl;
		cin >> choice;

		switch (choice)
		{
		case 0: //退出系统
			StuM.exitSystem();
			break;
		case 1: //添加职工
			StuM.Add_Stu();
			break;
		case 2: //显示职工
			StuM.Show_Stu();
			break;
		case 3: //删除职工
			break;
		case 4: //修改职工
			break;
		case 5: //查找职工
			break;
		case 6: //排序职工
			break;
		case 7: //清空文件
			break;
		default:
			system("cls");
			break;
		}
	}

	system("pause");
	return 0;
}